<template>
  <div id="revise">
    <div class="el_content">
      <el-row class="edit-title">
        <el-col :span="4">TMS 2/10</el-col>
        <el-col :span="2" :push="18" class="text-right">
          <el-button
            class="back"
            type="info"
            size="mini"
            plain
            icon="el-icon-arrow-left"
            @click="goBack"
          >返回</el-button>
        </el-col>
      </el-row>
      <el-form :model="info" :rules="rules" ref="info" label-width="150px" class="el_t_20">
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="阈值模式：" prop="name">
              <el-select v-model="info.name" placeholder="请选择阈值模式" class="el_long">
                <el-option label="请选择阈值模式" :value="1"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="线圈：" prop="name">
              <el-select v-model="info.name" placeholder="请选择线圈类型" class="el_long">
                <el-option label="请选择线圈类型" :value="1"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="阈值：" prop="name">
              <el-checkbox-group v-model="info.list">
                <el-checkbox label="左"></el-checkbox>
                <el-checkbox label="右"></el-checkbox>
              </el-checkbox-group>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="治疗部位：" prop="name">
              <el-select v-model="info.name" placeholder="请选择治疗部位" class="el_long">
                <el-option label="请选择治疗部位" :value="1"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="治疗模式：" prop="name">
              <el-select v-model="info.name" placeholder="请选择治疗模式" class="el_long">
                <el-option label="请选择治疗模式" :value="1"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="频率(HZ)：" prop="name">
              <el-select v-model="info.name" placeholder="请选择治疗频率" class="el_long">
                <el-option label="请选择治疗频率" :value="1"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="强度(%)：" prop="name">
              <el-select v-model="info.name" placeholder="请选择治疗强度" class="el_long">
                <el-option label="请选择治疗强度" :value="1"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="脉冲(个)：" prop="name">
              <el-select v-model="info.name" placeholder="请选择脉冲个数" class="el_long">
                <el-option label="请选择脉冲个数" :value="1"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <el-row class="footer-fixed">
        <el-col :span="24" class="text-right">
          <el-button type="primary" plain>取 消</el-button>
          <el-button type="primary" @click="submitInfo('info')">保 存</el-button>
        </el-col>
      </el-row>
    </div>
  </div>
</template>
<script>
export default {
  name: "revise",
  data() {
    return {
      info: {
        name: "",
        radio: 1,
        date: new Date(),
        remark:
          "该求助者的心理问题产生是由一次公开课发挥失常造成的，有明显的现实原因，而且有很好的自知力，也有求治愿望，从症状学来说，何某表现为焦虑、头疼、食欲下降、睡眠障碍等症状。"
      },
      rules: {
        name: [
          { required: true, message: "医嘱名称不能为空", trigger: "blur" }
        ],
        radio: [
          { required: true, message: "请选择所属分类", trigger: "change" }
        ]
      }
    };
  },
  methods: {
    submitInfo(formName) {
      this.$refs[formName].validate(valid => {
        if (valid) {
          alert("验证通过！");
        } else {
          return false;
        }
      });
    },
    goBack() {
      this.$router.go(-1);
    }
  }
};
</script>
<style scoped>
.el_content {
  width: 100%;
  height: calc(100vh - 108px);
  background: #ffffff;
  padding: 20px;
}
.edit-title {
  padding-bottom: 10px;
  border-bottom: 1px solid #e4e4e4;
  color: #006835;
  font-weight: 700;
}
</style>